package com.lims.util.interceptor;

import java.util.ArrayList;
import java.util.Locale;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;


import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;

public class Interceptor_ManagerAccess extends MethodFilterInterceptor {

	private static final long serialVersionUID = -2898746532483091042L;


	@SuppressWarnings("unchecked")
	@Override
	public String doIntercept(ActionInvocation arg0) throws Exception {

//		String result = "";
//
//		ActionContext ctx = arg0.getInvocationContext();
//
//		Map session = ctx.getSession();
//		HttpServletRequest request = (HttpServletRequest)ctx.get(ServletActionContext.HTTP_REQUEST);
//		Object o = session.get("admin"); //
//		if (request.getRequestURI().contains("admin")&&o == null) // 
//		{
//			result = "timeOut";
//		} else {
				return arg0.invoke();
//		}
//		return result;
	}


}
